package com.apply.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.apply.dao.GradeDao;
import com.apply.dao.Grade_zcMapper;
import com.apply.entity.ColumnAndValue;
import com.apply.entity.Courses;
import com.apply.entity.Department;
import com.apply.entity.Grade;
import com.apply.entity.Grade_mod;
import com.apply.entity.Student;
import com.apply.entity.Teachers_mod;
import com.apply.entity.campus;
import com.apply.service.GradeService;
@Service
public class GradeServiceImpl implements GradeService{
    @Autowired
	private Grade_zcMapper gm;
    @Autowired
	private GradeDao gd;
	@Override
	public List<Grade_mod> getGradeBycv(List<ColumnAndValue> cvList,
			String overText) {
		return gm.getGradeBycv(cvList, overText);
	}
	@Override
	public int getGradeCountBycv(List<ColumnAndValue> cvList, String overText) {
		return gm.getGradeCountBycv(cvList, overText);
	}
	@Override
	public List<Teachers_mod> getTeacherByCour(String cour, String campus) {
		if(cour.trim().equals("")){
			cour=null;
		}
		return gm.getTeacherByCour(cour, campus);
	}
	@Override
	public List<Teachers_mod> getTeacherBydepa(String depaid, String campus) {
		return gm.getTeacherBydepa(depaid, campus);
	}
	@Override
	public List<Teachers_mod> getJobTeacherByCampus(String campus) {
		return gm.getJobTeacherByCampus(campus);
	}
	@Override
	public int setGrade(String gradecode, String instructor, String jobteacher,
			String teacher, String gradeno) {
		return gm.setGrade(gradecode, instructor, jobteacher, teacher, gradeno);
	}
	@Override
	public List<campus> getCampus() {
		return gm.getCampus();
	}
	@Override
	public List<campus> getCampusByid(int id) {
		return gm.getCampusByid(id);
	}
	@Override
	public List<Department> getdepaBycampusid(int id) {
		return gm.getdepaBycampusid(id);
	}
	@Override
	public List<Department> getdepaByCampusidDepaid(int id, int depaid) {
		return gm.getdepaByCampusidDepaid(id, depaid);
	}
	@Override
	public List<Grade> getGradeListByCoursesId(int campusId, int courseId) {
		return gd.getGradeListByCoursesId(campusId, courseId);
	}
	@Override
	public List<Courses> getCoursesBydepa(int id, int depaid) {
		return gm.getCoursesBydepa(id, depaid);
	}
	@Override
	public List<Courses> getCourses(int id) {
		return gm.getCourses(id);
	}
	@Override
	public int getMindepaid(int id) {
		return gm.getMindepaid(id);
	}
	@Override
	public int getMincampusid() {
		return gm.getMincampusid();
	}
	@Override
	public int setOpenGrade(String gradeno) {
		return gm.setOpenGrade(gradeno);
	}
	@Override
	public int getGradeCountBycoursesid(String coursesid, String campusid) {
		return gm.getGradeCountBycoursesid(coursesid, campusid);
	}
	@Override
	public int addGrade(Grade grade) {
		return gm.addGrade(grade);
	}
	@Override
	public String getCodeByGradeon(String gradeno) {
		return gm.getCodeByGradeon(gradeno);
	}
	@Override
	public String getCodeByid(String id) {
		return gm.getCodeByid(id);
	}
	@Override
	public List<Student> getStudentByGradeno(String gradeno) {
		return gm.getStudentByGradeno(gradeno);
	}
	@Override
	public int getStudentCountByGradeno(String gradeno) {
		return gm.getStudentCountByGradeno(gradeno);
	}
	@Override
	public int setUpdateGradeByGradeno(String gradeno) {
		return gm.setUpdateGradeByGradeno(gradeno);
	}
	@Override
	public List<Student> getStudentBycv(List<ColumnAndValue> cvList,
			String overText) {
		return gm.getStudentBycv(cvList, overText);
	}
	@Override
	public int getStudentCountBycv(List<ColumnAndValue> cvList,
			String overText) {
		return gm.getStudentCountBycv(cvList, overText);
	}

}
